﻿using GsOrganization.TcpPacket;
using GsOrganization.TcpServer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GSOrganization.Application
{
    public class TcpSendDataService: ITransient, Furion.DynamicApiController.IDynamicApiController
    {

        [HttpGet]
        public void SendHelloWorld()
        {
            var packet = new ServerMessagePacket(MessageCommandId.SendHelloWorldReq,"Hello World!");
            var deviceId = "7b2821e8b60fb51c5357ae15e745b221dbd253e9769ec53d2923bc584f84e515";
            var tcpClient = TcpResourcesManager.GetSession(deviceId);
            tcpClient.SendMessage(packet);
        }
    }
}
